package SSM.Chat.Controller;


import SSM.Chat.Domain.*;
import SSM.Chat.Service.BookService;
import SSM.Chat.Service.impl.BookServiceImpl;
import SSM.Chat.Utils.Code;
import SSM.Chat.Utils.Mailbox;
import SSM.Chat.Utils.Request;
import SSM.Chat.Utils.Token;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.DigestUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.mail.MessagingException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;


@RestController
// 将web变成bean
// ，并将最后的return
// 的数据作为整体返回给前端
//@RequestMapping
// ("/books") //
// 用于修饰类，则是该类所有方法的总路径，修饰方法则是方法的路径


public class Web {
    //自动装配
    private BookServiceImpl bookService =new BookServiceImpl();

   public List<Settings> ss(){
       System.out.println(11);
       List<Settings> test = null;
       try {
           test = bookService.test();
       } catch (Exception e) {
           System.out.println(e);
       }
       System.out.println(22);
       System.out.println(test);
       return  test;
   }

}






